﻿@model Tasks.UI.Models.DictManageModel
@{
    Layout = null;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>DictManage</title>
    <link href="@Config.GetCssResourcePath("main.css")" rel="stylesheet" type="text/css" />
    <link href="@Config.GetCssResourcePath("table.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Scripts/jquery-impromptu.3.1.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-impromptu.3.1.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/global.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/page/dict.manage.js")" type="text/javascript"></script>
    <style type="text/css">
        *
        {
            margin: 0;
            padding: 0;
        }
        .container
        {
            width: 100%;
            padding: 10px 0px 0px 10px;
        }
        
        .tblStyle1 input
        {
            width: 100%;
        }
    </style>
</head>
<body>
    <form action="Manage" method="post">
    <div id="container">
        <div class="navTitle">
              <ul>
                    <li class="Home SecondLast"><a href="#">
                        <div class="HomeIcon">
                        </div>
                        <font><font>Home</font></font></a></li><li class="Last"><span><font><font>@(Model.Title) </font></font></span></li>
                </ul></div>
        <div class="searchBar">
        <div class="box">
            <table>
                <tr>
                    <td>
                        <label>
                            <strong>名称：</strong></label>
                        @Html.TextBox("Name")
                        <input type="submit" value="查询" class="btnSearch" />
                        <input id="act" name="act" type="hidden" />
                        <input id="DictID" name="DictID" type="hidden" />
                    </td>
                </tr>
            </table>
            <div class="bottom">
            </div>
             </div>
        </div>
        <div class="pageBody">
            <table class="tblStyle1" id="tb">
                <thead>
                    <tr>
                        <th style="width: 10%">
                            序号
                        </th>
                        <th style="width: 25%">
                            名称
                        </th>
                        <th style="width: 55%">
                            内容
                        </th>
                        <th style="width: 10%">
                            操作
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr style="display: none;">
                        <td class="info c" name="SNO">
                            <input id="SNO" name="SNO" type="hidden" class="hidSNO" />
                            <span class="SNO"></span>
                        </td>
                        <td class="info" name="Name">
                            <input id="Name" name="Name" type="text" />
                        </td>
                        <td class="info" name="Content">
                            <input id="Content" name="Content" type="text" />
                            @Html.Hidden("DictKey")
                        </td>
                        <td class="c">
                            <input type="hidden" value="0" />
                            <a href="javascript:void(0)" onclick="editRow(this)" class="btnEdit" style="display: none">
                                <img src="/images/icon/16x16/file_edit.png" title="编辑" /></a> <a href="javascript:void(0)" onclick="setRowState(this,0)" class="btnCanelEdit">
                                    <img src="/images/icon/16x16/cancel.png" title="取消" /></a> <a href="javascript:void(0)" onclick="delRow(this)" class="delRow" style="display: none">
                                        <img src="/images/icon/16x16/delete.png" title="删除" /></a><a href="javascript:void(0)" onclick="saveRow(this)" class="btnSaveRow"><img src="/images/icon/16x16/save.png" title="保存" /></a>
                        </td>
                    </tr>
                    @foreach (DictValue dict in Model.Dicts)
                    { 
                        <tr class="edit" id="tpl">
                            <td class="info c" name="SNO">
                                @dict.SNO
                            </td>
                            <td class="info" name="Name">
                                @dict.Name
                            </td>
                            <td class="info" name="Content">@dict.Content
                            </td>
                            <td class="c">
                                @if (dict.OwnerID != 0)
                                {
                                    <input id="ID" type="hidden" value="@dict.ID" name="ID"/>
                                    <a href="javascript:void(0)" onclick="editRow(this)" class="btnEdit"><img src="/images/icon/16x16/file_edit.png" title="编辑" /></a> <a href="javascript:void(0)"
                                        onclick="setRowState(this,0)" class="btnCanelEdit" style="display: none"><img src="/images/icon/16x16/cancel.png" title="取消" /></a>
                                    <a href="javascript:void(0)" onclick="delRow(this)" class="delRow"><img src="/images/icon/16x16/delete.png" title="删除" /></a><a href="javascript:void(0)"
                                        onclick="saveRow(this)" style="display: none" class="btnSaveRow"><img src="/images/icon/16x16/save.png" title="保存" /></a>
                                }
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
            @Html.RenderPageNav(Model.PageIndex, Model.PageSize, Model.RowCount, "", PageNavStyle.Form)
        </div>
        <div class="pageFooter">
            <a href="javascript:addRow()" class="button blue"><span>添加</span></a>
        </div>
    </div>
    </form>
</body>
</html>
